<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="classes.*" %>
<%@ page import ="java.util.List" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>管理员主页</title>
	<%	 //初始化
		 List<Students> flushList=null;
    	 request.getSession().setAttribute("select_students_result",flushList);
    	 List<Courses> flushLista=null;
         request.getSession().setAttribute("select_Courses_result",flushLista);
    	 
		 request.setCharacterEncoding("UTF-8");
		 String message=String.valueOf((request.getSession().getAttribute("admin_message")));
	%>
	<script>
		var message='<%=message%>';
		if(message.length!=0&&message!="null"){
			alert(message);
		}
		</script>	
		<%//复原
			request.getSession().setAttribute("admin_message","");
		%>		

</head>
<body>
<% String adminID=String.valueOf((request.getSession().getAttribute("ID")));%>
<h2 algin="center">欢迎管理员：<%=adminID%></h2>
<div algin="left">
	<ul>
	<li><a href="http://localhost:8080/my_term_project_xuanke/admin/updatePW.jsp">修改密码</a></li>
	<li><a href="http://localhost:8080/my_term_project_xuanke/adminServlet?action=exit">退出</a></li>
	</ul>
</div>
<table align="center">
<font size="20">
	<tr><th></th><th>学生</th><th>课程</th></tr>
	<tr><th>增加</th>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/add_student.jsp">新增学生信息</a></td>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/add_course.jsp">新增课程信息</a></td>
	</tr>
	<tr><th>删除</th>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/look_student.jsp">删除已有学生</a></td>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/look_course.jsp">删除已有课程</a></td>
	</tr>
	<tr><th>更改</th>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/look_student.jsp">更改已有学生</a></td>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/look_course.jsp">更改已有课程</a></td>
	</tr>
	<tr><th>查找</th>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/select_student.jsp">查找已有学生</a></td>
		<td><a href="http://localhost:8080/my_term_project_xuanke/admin/select_course.jsp">查找已有课程</a></td>
	</tr>
</font>
</table>
</body>
</html>